/**
* AutoSWF - Cody Cushing. March 26, 2009
* Copyright (c) 2009 Cody Cushing
* No use restrictions. Maintain this notice in all versions. 
**/

package com.autoswf.locator
{
	/**
	 * An object used to register a service with a locator by bubbling up tiers.
	 */	
	public class ServiceRegistration
	{
		protected var _service:Object;
		protected var _registeredClass:Class;
		
		
		/**
		 * Constructor. 
		 * 
		 * @param service  The service instance
		 * @param registeredTo  The class definition or interface to register this service to.
		 */
		public function ServiceRegistration(service:Object, registeredTo:Class)
		{
			_service = service;
			_registeredClass = registeredTo;
		}
		
		
		/**
		 * The service instance to add to the Locator's dictionary.
		 */
		public function get service():Object
		{
			return _service;
		}
		
		
		/**
		 * The class definition or interface to register this service to.
		 */
		public function get registeredClass():Class
		{
			return _registeredClass;
		}

	}
}